﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ymatou.Coupon.Manage.Contract;
using Ymatou.Coupon.Manage.Contract.Conversion;

namespace WebIOCService.Interface
{
    public interface ICouponService
    {
        /// <summary>
        /// 获取兑换码ID
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        int GetConversionBillByBatchReq(string batchCode);

        /// <summary>
        /// 获取兑换码生成状态
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        TaskStatusInfo GetConversionCodeGenerateStatusReq(int conversionBillId);

        /// <summary>
        /// 获取兑换码生成数量
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        GetConversionBillInfoResp GetConversionBillInfoReq(int conversionBillId);

        /// <summary>
        /// 获取兑换码生成方式(1：自定义)
        /// </summary>
        /// <param name="conversionBillId"></param>
        /// <returns>1：自定义</returns>
        int GetGenerateMethod(int conversionBillId);

        /// <summary>
        /// 获取兑换码生成数量
        /// </summary>
        /// <param name="conversionBillId"></param>
        /// <returns></returns>
        int GetGenerateQuantity(int conversionBillId);

        /// <summary>
        /// 分页获取兑换码
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        List<Coupon> GetConversionCodesByPaging(int conversionBillId, int pageIndex, int pageSize);

        /// <summary>
        /// 获取优惠券批次内容
        /// </summary>
        /// <param name="batchId"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        CouponBatch GetCouponBatch(int batchId, out string msg);

        /// <summary>
        /// 获取优惠券批次内容
        /// </summary>
        /// <param name="batchId"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        List<CouponBatch> GetCouponBatchs(List<int> batchIds, out string msg);
    }
}
